package com.jackiechan.hello.day02;

import java.util.Scanner;

/**
 * 将字符串123,456,789,012根据","拆分，并输出拆分后的每一项
 * @author Xiloer
 *
 */
public class Test02 {
    public static void main(String[] args) {
        System.out.print("请输入字符串:");
        String string = new Scanner(System.in).nextLine();
        show(string);
    }

    private static void show(String string) {
        String[] strings = string.split(",");
        for (String s :strings) {
            System.out.println(s);
        }
    }
}
